<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html >
<head>
<title>系统基本信息</title>
<script type="text/javascript">
//保存并查询
function doIns(){
	if(check()){
		if(confirm("确认保存信息?")){
			document.all.operate.value = "insinfo";
			document.forms[0].submit();
		}
	}
}
		
function doDel(obj){
	document.all.time.value = document.all.showtime.value;
	document.all.operate.value = "delinfo";
	document.forms[0].submit();
}
function doTime(obj){
	document.all.time.value = obj.value;
	document.forms[0].submit();
}
</script>
</head>
<body>
<form action="<%=path %>/userinfomag.action" method="post" name="myform">
<table width="760" border="0" cellpadding="0" cellspacing="0" >
	<tr>
     <td>
     <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="MainBody">
      <tr>
        <td class="MainBody_title"><hello:forValue type="title" /></td>
      </tr>
        <tr>
          <td class="MainBody_body" style="padding:10 20px 0 0;">
          	<div align="right" style="padding: 0 30 10 0;"><input name="operate" type="hidden" value=""/>
	      	 <input name="time" type="hidden" value=""/>
	      	 <select name="showtime" onchange="doTime(this)">
				<c:forEach var="row" varStatus="status" items="${timelist}">
				<option value="${row.createtime }" <c:if test="${row.selected=='y'}">selected</c:if> >${row.createtime }</option>
				</c:forEach>
	      	 </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	      	 <input type="button" class="btn" value="保 存" onclick="doIns()"/>&nbsp;&nbsp;
			 <input type="button" class="btn" value="重 置" onclick="doDel()"/>&nbsp;&nbsp;</div>
          	<table  border="0" cellpadding="0" cellspacing="0" class="MainBody_table_y">
          		<tr>
                  <td  colspan="6" class="bg_title">系 统 用 户 信 息</td>
                </tr>
                <tr>
					<th width="13%">公司名称：<input type="hidden" name="puser.id" value="${userinfo.id}"/></th>
					<td width="30%"><input title="公司名称" name="puser.company" value="${userinfo.company}" type="text" class="notnull" maxlength="30" check="checkBlank" /></td>
					<th width="13%">公司地址：</th>
					<td width="44%" colspan="3"><input title="公司地址" name="puser.address" value="${userinfo.address}" type="text" class="notnull" maxlength="30" check="checkBlank" /></td>
				</tr>
				<tr>
					<th>联系电话：</th>
					<td><input title="联系电话" name="puser.telnumber" value="${userinfo.telnumber}" type="text" class="notnull" maxlength="30" check="checkBlank,checkInt" /></td>
					<th>电子邮箱：</th>
					<td colspan="3"><input title="电子邮箱" name="puser.email" value="${userinfo.email}" type="text" class="notnull" maxlength="30" check="checkBlank,checkEmail" /></td>
				</tr> 
				<tr>
					<th>传&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;真：</th>
					<td><input title="传真" name="puser.faxnumber" value="${userinfo.faxnumber}" type="text" maxlength="30"/></td>
					<th>公司网址：</th>
					<td colspan="3"><input title="公司网址" name="puser.website" value="${userinfo.website}" type="text" maxlength="30"/></td>
				</tr>
				<tr>
					<th>开&nbsp;&nbsp;户&nbsp;&nbsp;行：</th>
					<td ><select name="puser.bank" style="width: 98%"></select></td>
			    	<th>账&nbsp;&nbsp;户&nbsp;&nbsp;号：</th>
					<td width="24%"><input title="账户号" name="puser.banknumber" value="${userinfo.banknumber}" type="text" maxlength="30" /></td>
					<th width="10%">账户名：</th>
					<td><input title="账户名" name="puser.bankname" value="${userinfo.bankname}" type="text" maxlength="30" /></td>
			    </tr>
			    
				<%--<tr>
		    		<th>Smtp地址：</th>
		    		<td><input maxlength="30" title="smtp地址" value="<%=jbxx==null?"":(jbxx.getSmtpdz()==null?"":jbxx.getSmtpdz()) %>" name="jbxx.smtpdz" type="text" class="ip_text notnull" style="width:200px;" check="checkBlank" /></td>
					<th>Imap地址：</th>
					<td><input maxlength="30" title="pop3地址" value="<%=jbxx==null?"":(jbxx.getPopdz()==null?"":jbxx.getPopdz()) %>" name="jbxx.popdz" type="text" class="ip_text notnull" style="width:200px;" check="checkBlank" /></td>
				</tr>
				<tr>
					<th>邮箱账号：</th>
					<td><input maxlength="20" title="邮箱账号" type="text" id="cc" value="<%=jbxx==null?"":(jbxx.getYxzh()==null?"":jbxx.getYxzh()) %>" name="jbxx.yxzh" class="ip_text notnull" style="width:200px;" check="checkBlank" /></td>
					<th>邮箱密码：</th>
					<td><input maxlength="20" title="邮箱密码" type="password" value="<%=jbxx==null?"":(jbxx.getYxmm()==null?"":jbxx.getYxmm()) %>" name="jbxx.yxmm" class="ip_text notnull" style="width:200px;" check="checkBlank" /></td>
				</tr>--%>
            </table>
          &nbsp;&nbsp;
          <table  border="0" cellpadding="0" cellspacing="0" class="MainBody_table">
          		<tr>
                  <td  colspan="6" class="bg_title">在 线 用 户 列 表</td>
                </tr>
                <tr>
					<th width="13%">用户姓名</th>
					<th width="13%">账户名称</th>
					<th width="13%">职务</th>
					<th width="13%">登录ip</th>
					<th width="13%">登录时间</th>
				</tr>
				<c:forEach var="user" varStatus="status" items="${onlineuser}">
				<tr>
					<td>${user.personname}</td>
					<td>${user.loginid}</td>
					<td>${user.posname}</td>
					<td>${user.ip}</td>
					<td>${user.landtime}</td>
				</tr>
				</c:forEach>
            </table>
		</td>
  	</tr>
</table>
</form>
<script type="text/javascript">
if('${msg}'=='true'){
	_alert('保存成功');
}else if('${msg}'=='false'){
	_alert('保存失败');
}
doSelectInfo(document.all["puser.bank"],'client_bank','${userinfo.bank}');
</script>
</body>
</html>